package gervosou;

import java.io.Serializable;

public class ComptePerso 
	implements Serializable {
		
	/**
	 * 
	 */
	//private static final long serialVersionUID = 7159587513893127562L;
	private int numero;
	private String type;
	private float solde;
	private int decouvertAutorise;
	private ClientPhysique client;

	public ComptePerso(int n, String t, float s, int d, ClientPhysique c) {
		this.setNumero(n);
		this.setType(t);
		this.setSolde(s);
		this.setDecouvertAutorise(d);
		this.lierClientPhysique(c);
	}

	public void setNumero(int n)
	{numero = n;}
	
	public void setType(String t)
	{type = t;}
	
	public void setSolde(float s)
	{solde = s;}
	
	public void setDecouvertAutorise(int d)
	{decouvertAutorise = d;}
	
	public void setClientPhysique(ClientPhysique c)
	{client = c;}
	
	private void lierClientPhysique(ClientPhysique c) {
		this.setClientPhysique(c);
		c.rajoutCompte(this);
		
	}
	
	public ClientPhysique getClientPhysique() {
		return(client);
	}

	public int getNumero() {
		return numero;
	}

	public String getType() {
		return type;
	}

	public Float getSolde() {
		return solde;
	}
	
	public int getDecouvertAutorise() {
		return decouvertAutorise;
	}
	

}
